import Vue from 'vue'
import VueRouter from 'vue-router'
import Bill from '../views/Bill.vue'
import Transfer from '../views/Transfer.vue'
import Deposit from '../views/Deposit.vue'
import Login from '../views/Login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
    meta: {
      needlogin: false
    }
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
    meta: {
      needlogin: false
    }
  },
  {
    path: '/bill',
    name: 'Bill',
    component: Bill,
    meta: {
      needlogin: true
    }
  },
  {
    path: '/transfer',
    name: 'Transfer',
    component: Transfer,
    meta: {
      needlogin: true
    }
  },
  {
    path: '/deposit',
    name: 'Deposit',
    component: Deposit,
    meta: {
      needlogin: true
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})


export default router
